package com.ad.pet.common.structure.ui.control.manager;

import android.support.v4.widget.SwipeRefreshLayout;

/**
 * Created by z on.
 * Des:
 * Date: 2017/3/21
 */

public class SwipeRefreshLayoutManager {


    public static void refresh(final SwipeRefreshLayout swipeRefreshLayout, long time, final boolean b) {
        swipeRefreshLayout.postDelayed(new Runnable() {
            @Override
            public void run() {
                swipeRefreshLayout.setRefreshing(b);
            }
        }, time);
    }

    public static void refreshEnd(final SwipeRefreshLayout swipeRefreshLayout) {
        refresh(swipeRefreshLayout, 500, false);
    }
}
